﻿<local:DocumentBase x:Class="WPFExcelReport.WB18GI"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:ReflectionStudio.Core.Database;assembly=ReflectionStudio.Core"
        xmlns:wep="clr-namespace:WPFExcelReport"
       Height="700" Width="1024" 
          
        Title=" "  
     >
    <local:DocumentBase.Resources>
        <db:INTEXDataSet x:Key="iNTEXDataSet" />
    </local:DocumentBase.Resources>
    <Grid DataContext="" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="120"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel Grid.Row="0">
            <Button Content="查询" Height="25" HorizontalAlignment="Left" Margin="11,17,0,0" Name="btnQuery"
                        Click ="btnQuery_Click" VerticalAlignment="Top" Width="106" />
            <Button Content="产生报表" Height="25" HorizontalAlignment="Left" Margin="11,17,0,0" Name="btnReport"
                        Click ="btnReport_Click" VerticalAlignment="Top" Width="106" />
        </WrapPanel>
        <GroupBox Grid.Row="1"
            Header="布卷检验报告" Height="100" HorizontalAlignment="Stretch" Name="groupBox1" VerticalAlignment="Top"
                  Margin="10,5,5,10" BorderBrush="#FFFCF5F5" Foreground="#FF0D0C0C">
            <WrapPanel Background="#FFF2EFEF">
                <Label Content="检验时间从" Height="26" HorizontalAlignment="Left" Margin="10,16,0,0" Name="label1" VerticalAlignment="Top" Width="70" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="10,16,0,0" Name="FROM_INSPECTION_DATE" VerticalAlignment="Top" 
                                SelectedDateChanged ="FROM_INSPECTION_DATE_SelectedDateChanged" Width="95" />
                <Label Content="至" Height="28" HorizontalAlignment="Left" Margin="10,16,0,0" Name="label2" VerticalAlignment="Top" Width="29" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="10,16,0,0" Name="END_INSPECTION_DATE" VerticalAlignment="Top" 
                                SelectedDateChanged ="END_INSPECTION_DATE_SelectedDateChanged" Width="95" />
                <Label Content="按缸号导出" Height="24" HorizontalAlignment="Left" Margin="10,16,0,0" Name="label3" VerticalAlignment="Top" Width="72" />
                <TextBox Height="23" HorizontalAlignment="Right" Margin="10,16,0,0" Name="LOT" VerticalAlignment="Top" Width="104" BorderBrush="#FF2E2A2A" Background="#FFF2E6E6" />
                <Label Content="品种" Height="24" HorizontalAlignment="Left" Margin="10,16,0,0" Name="label4" VerticalAlignment="Top" Width="27" />
                <TextBox Height="23" HorizontalAlignment="Right" Margin="10,16,0,0" Name="ARTICLE" VerticalAlignment="Top" Width="104" BorderBrush="#FF2E2A2A" Background="#FFF2E6E6" />
                <CheckBox Content="坯布" Height="16" Margin="10,10,0,0" Name="checkBox1" Background="#FFF2E6E6" />
            </WrapPanel>
        </GroupBox>
        <fd:FilteringDataGrid Grid.Row="2"
            AutoGenerateColumns="False" EnableRowVirtualization="True"  
                                             ItemsSource="{Binding Path=PIECE_INSPECTION}"
                                              x:Name="MasterData" 
                                                 CanUserReorderColumns="True"  
                                             CanUserResizeRows="True"
                                              CanUserSortColumns="True"
                                              IsFilteringCaseSensitive="False" 
                                              RowDetailsVisibilityMode="VisibleWhenSelected"   
                                              Width="1000"
                                              Height="500"
                                              EnableColumnVirtualization="True"  
                                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                              ScrollViewer.VerticalScrollBarVisibility="Auto"
                                              SelectionChanged="ItemsControls_SelectionChanged">
            <DataGrid.Columns>
                <!--缸号	卡号	布卷号	序号	检验日期	检验人	检验标准	布卷码数	疵点编号	描述	起始长	结束长	起始宽	结束宽	备注-->
                <DataGridTextColumn Binding="{Binding Path=WBBDPART}" Header="缸号" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=CARDNO}" Header="卡号" Width="SizeToCells" MinWidth="60" />
                <DataGridTextColumn Binding="{Binding Path=WBBSTKNR}" Header="布卷号" Width="SizeToCells" MinWidth="80" />
                <DataGridTextColumn Binding="{Binding Path=WBFKVERSION}" Header="序号" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=WBFKNEUDAT}" Header="检验日期" Width="SizeToCells" MinWidth="80" />
                <DataGridTextColumn Binding="{Binding Path=ARTICLE}" Header="品种" Width="SizeToCells" MinWidth="100" />
                <DataGridTextColumn Binding="{Binding Path=HRNNAME}" Header="检验人" Width="SizeToCells" MinWidth="60" />
                <DataGridTextColumn Binding="{Binding Path=WBFKSART}" Header="检验标准" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=GRADE}" Header="质量等级" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=YARDQTY}" Header="布卷码数" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=REMARK}" Header="备注" Width="SizeToCells" MinWidth="120" />
            </DataGrid.Columns>
        </fd:FilteringDataGrid>
    </Grid>
</local:DocumentBase > 